package rsi.mesoscopic.model;

public enum Direction {
	N(0), NE(1), E(2), SE(3), S(4), SW(5), W(6), NW(7);
	
	private int mDirection;
	
	private Direction(int v) {
		mDirection = v;
	}
	
	public int getId() {
		return mDirection;
	}
	
	public static Direction getFromId(int id) {
		return Direction.values()[id];
	}
	
	public Direction oposite() {
		int direction = (getId()+4)%8;
		
		return getFromId(direction);
	}
}
